package cc.dawning.utiming.lklocation.location.adapter;

import android.support.annotation.Nullable;

import com.amap.api.services.help.Tip;

import cc.dawning.utiming.lklocation.R;
import cc.dawning.utiming.lklocation.location.adapter.holder.LocationViewHolder;

import java.util.List;

import cc.vv.lkbasecomponent.base.ui.adapter.LKBaseSingleAdapter;


/**
 * Date 2018/3/27
 * Describe 搜索地址适配器
 *
 * @auther liuxin
 */

public class LocationSearchAdapter extends LKBaseSingleAdapter<Tip, LocationViewHolder> {

    public LocationSearchAdapter(int layoutResId, @Nullable List<Tip> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(LocationViewHolder helper, Tip item) {
        super.convert(helper, item);

        helper.setText(R.id.tv_location, item.getName());
        helper.setText(R.id.tv_location_detail, item.getDistrict() + item.getAddress() + item.getName());

    }
}
